#include<iostream>
#include<vector>
#include<queue>
#include<cstring>
#include<cmath>
#include<map>
#include<set>
#include<cstdio>
#include<algorithm>
#define debug(a) cout<<#a<<"="<<a<<endl;
using namespace std;
const int maxn=5e4+100;
typedef long long LL;
inline LL read(){LL x=0,f=1;char ch=getchar();	while (!isdigit(ch)){if (ch=='-') f=-1;ch=getchar();}while (isdigit(ch)){x=x*10+ch-48;ch=getchar();}
return x*f;}
LL a[maxn];
LL solve(LL x){
    LL ans=0;
    for(LL i=1;i<=sqrt(x);i++){
        if(x%i==0){
            if(i*i==x){
                ans+=i;
                break;
            }
            else{
                ans+=i;
                ans+=x/i;
            }
        }
    }
    return ans;
}
int main(void)
{
  cin.tie(0);std::ios::sync_with_stdio(false);
  LL n;cin>>n;
  LL ans=0;
  for(LL i=1;i<=n;i++){
    ans+=solve(i);
  }
  LL sum=0;
  LL pos=0;
  for(LL i=1;i<=sqrt(ans);i++){
     sum+=(ans/i)*i;
     if(ans/i>sqrt(ans)){
            LL temp=ans/i;
            LL p=sqrt(ans)+1;
            sum+=(temp-p+1)*(temp+p)/2;
     }
  }
  cout<<sum<<"\n";
return 0;
}
